<html xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="utf-8">
		<link rel="stylesheet" href="css/index.css">
        <script language="JavaScript" src="js/index.js"></script>
	</head>
	<body>
		<div id="div_container">

			<div id="div_fruit_list">
				<p class="center f30">欢迎使用菜单后台管理系统</p>
				<div style="border:0px solid red;width:60%;margin-left:20%;text-align:right;">
					<a th:href="@{/add.html}" style="border:0px solid blue;margin-bottom:4px;">添加新库存记录</a>
				</div>
				<table id="tbl_fruit">
					<tr>
						<th class="w20">编号</th>
						<th class="w20">名字</th>
						<th class="w20">类型</th>
						<th class="w20">价格</th>
						<th>操作</th>
					</tr>
					<tr th:if="${#lists.isEmpty(session.menuList)}">
						<td colspan="4">对不起，菜单为空！</td>
					</tr>
					<tr th:unless="${#lists.isEmpty(session.menuList)}" th:each="menu : ${session.menuList}">
						<!-- <td><a th:text="${fruit.fname}" th:href="@{'/edit.do?fid='+${fruit.fid}}">苹果</a></td> -->
						<td><a th:text="${menu.name}" th:href="@{/edit.do(id=${menu.id})}">苹果</a></td>
						<td th:text="${menu.price}">5</td>
						<td th:text="${menu.type}">20</td>
						<!-- <td><img src="imgs/del.jpg" class="delImg" th:onclick="'delFruit('+${fruit.fid}+')'"/></td> -->
                        <td><img src="imgs/del.jpg" class="delImg" th:onclick="|delMenu(${menu.id})|"/></td>
					</tr>
				</table>

				<div style="width:60%;margin-left:20%;border:0px solid red;padding-top:4px;" class="center">
					<input type="button" value="首  页1" class="btn" th:onclick="|page(1)|" />
					<input type="button" value="上一页" class="btn" th:onclick="|page(${session.pageNo-1})|" />
					<input type="button" value="下一页" class="btn" th:onclick="|page(${session.pageNo+1})|" />
					<input type="button" value="尾  页" class="btn" />
				</div>
			</div>
		</div>
	</body>
</html>
